package org.crazyit.activiti_d4._2_GetUserInfo;

import org.activiti.engine.IdentityService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;

public class GetUserInfo {

    public static void main(String[] args) {

        //1. 创建流程引擎
        ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();

        //2. 得到身份服务组件实例
        IdentityService identityService = engine.getIdentityService();

        /*
            3. 查询用户信息
            由于上一个类已经插入过用户信息, 这边直接查询
         */
        String weight = identityService.getUserInfo("42e737c3-d7ba-4f93-bdd1-11e4c327f7e3", "weight");
        System.out.println("用户体重为:" + weight);

    }

}
